[SWEA] 파핑파핑 지뢰찾기 / D4 / 80분#85
Open
Son-juyeong wants to merge 1 commit into
Open
Conversation
Collaborator
|
미리 주변 지뢰 갯수를 센 count 배열을 만들지 않고 탐색을 할 수 있다는 사실을 알게 되었네요... 탐색을 하는 도중에 지뢰갯수도 찾는 기슬 잘 배웠습니다. |
Collaborator
|
저는 count배열을 따로 만든 후에 계산하여 주변 지뢰 개수를 저장했는데 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
먼저 한꺼번에 없앨 수 있는 구간을 찾아서 bfs를 수행하였습니다. bfs를 하면서 팔방에 지뢰가 없을 때에만 해당 위치를 q에 offer하였습니다. 남은 구간들은 누르면 한칸씩밖에 사라지지 않기 때문에 이중포문을 다시 돌려 방문처리 안되어 있으면서 '.'인 부분을 발견 시 answer를 추가하는 방향으로 구현하였습니다.